/*
 * Copyright (c) 2023 iQi.Co.Ltd. All rights reserved.
 */
 
using IQIGame.Onigao.Framework;
using System.Collections.Generic;
using System.Linq;
using System;
using NetProtocol.Enum;

namespace NetProtocol.POD {

	/// <summary>
	///  逻辑服踢玩家结果 -- 可能要捎带返回玩家的部分数据
	/// module : structs_internal
	/// </summary>
	public class KickLogicPlayerResultPOD : IPOD 
    {
        public readonly static Func<KickLogicPlayerResultPOD> FACTORY = () => new KickLogicPlayerResultPOD();
		public static Func<KickLogicPlayerResultPOD> DynamicFactory = FACTORY;
        
		/*-- members --*/
		/// <summary>
        /// 
        /// </summary>
		public int code;
		
		
		
		/*-- constructors --*/
		public KickLogicPlayerResultPOD() {}
		public KickLogicPlayerResultPOD(int code) {
			this.code = code;
		}
	      public void Serial(SOutputStream _out) {
            _out.Write_int(code);
        }
        
        public void UnSerial(SInputStream _in) {
            if(!_in.HasRemaining()) return;
            code = _in.Read_int();
        }
		
		public KickLogicPlayerResultPOD Clone() {
            KickLogicPlayerResultPOD o = DynamicFactory();
            o.code = code;
            return o;
        }
        
        public void Clear() {
            code = default;
        }
		
        public override string ToString() {
			string str = "";
			str += "KickLogicPlayerResultPOD [";
			str += "code=";
			str += code;
			str += "]";
			return str;
		}
		
	}
}